package csce315.group10.androidapp;

import csce315.group10.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.TextView;

public class MessageEntry extends Activity{
	/* private instance variables */
	CustomApp appState;
	Message chosen_message;
/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.messageentry);
        appState = ((CustomApp)getApplicationContext());
        /* set all fields to message data */
        chosen_message = getIntent().getParcelableExtra("message");
        TextView text = (TextView) findViewById(R.id.Message_text);
        text.setText(chosen_message.get_text());
        TextView author = (TextView) findViewById(R.id.Author_text);
        author.setText(chosen_message.get_author());
    }
}